package com.generator;

import cn.hutool.db.Db;

import java.sql.DatabaseMetaData;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

public class DbTest {
    
    
    public static void main(String[] args) throws SQLException {
        String url = "jdbc:mysql://10.19.13.14:3307/smart_community?characterEncoding=utf-8&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai";
        String user = "root";
        String pwd = "123456";
        String tableName = "busi_file";
        Db db = DbUtil.getDb(url,user,pwd);
        PreparedStatement ps = db.getConnection().prepareStatement("show create table "+tableName);
        ResultSet rs = ps.executeQuery();
        while (rs.next()){
            System.out.println(rs.getString(1)+rs.getString(2));
        }



    }
}